<style>
/* 重写样式 */
.fui-header.block {
    display: block;
}

.fui-tab {
    margin: 0;
}

.fui-tab a {
    height: 2.2rem;
    line-height: 2.2rem;
}

.fui-tab:after {
    display: none;
}
.nickname {
    color: #50b6fe;
}
    .shop-index-page .menu {height: auto; background: #fff;}
    .shop-index-page .menu .item {height: auto; width: 1%; padding: 0.5rem 0; margin: 0; font-size: 0.7rem; color: #636363; text-align: center; display: table-cell;position: relative;}
    .shop-index-page .menu .item:after  {font-size: 0.7rem;position: absolute;content: '';left:-1px;top:0.5rem;bottom:0.5rem;border-left:1px solid #d9d9d9;}
    .content-empty{padding:1rem 0;margin:0;}
source{
    min-width: 100%;
    min-height: 100%;
    height: auto;
    width: auto;
}
.weui_btn:after {
  border: 0 solid rgba(0, 0, 0, 0.2);;
  border-radius: 10px;
}
.btn.btn-success{background:#F5F0FF}
.btn.btn-success, .jy-btn1{border-radius:1rem;background:linear-gradient(95.84deg, #EDF6FF 5.59%, #F0F3FF 51.42%, #F5F0FF 97.24%)}
.btn.btn-blue, .jy-btn2{border-radius:1rem;background:linear-gradient(136deg, #7783EA, #4e6ef2, #7274f9, #9f66ff)}
.jy-topbg{background:linear-gradient(to bottom, #f8dfd8, #F5F0FF, #F0F3FF, #f7f7f7)}
</style>
<div class='fui-page fui-page-current'>
	<div class="fui-content">
	<div class="jy-topbg" style="top:0;">
	<div class="jy-content">
	<div style="position: relative;">
	<div class="fui-cell-title c" style="padding-top:3rem;padding-bottom:0">
		<img ng-src="{{pagedata.pluginset.ailogo || '../addons/jy_aiagent/resource/images/ailogo.png'}}" style="height:4rem;"/>
	</div>
	<div class="fui-cell-title bold c">{{pagedata.showtypetitle}}好！{{pagedata.pluginset.toptitle||'我是你的AI智能体'}}</div>
	<img ng-if="pagedata.member && pagedata.member.sex==1" src="../addons/jy_aiagent/resource/images/nan2.png" style="width: 5rem;position: absolute;bottom:0;right:0"/>
	<img ng-if="pagedata.member && pagedata.member.sex!=1" src="../addons/jy_aiagent/resource/images/nv2.png" style="width: 5rem;position: absolute;bottom:0;right:0"/>
	</div>
	<div class="radius" style="background: #ffff;">
	<div style="padding-top: 0.5rem;">
		<div class="c">
			<div class="fui-cellone" style="padding-top: 0;">
			<div class="fui-cellone-text" style="padding-right:0.5rem">
				<div class="radius c jy-btn1" ng-click="pagedata.show2addgoods=true" style="border-radius:1rem;color:#7783EA;padding:0.6rem">
					<i class="icon icon-tianjia"></i>手动加设备
				</div>
			</div>	
			<div class="fui-cellone-text">
				<div class="radius c jy-btn2" ng-click="pagedata.show2lanya=true" style="border-radius:1rem;color:#fff;padding:0.6rem">
					<i class="icon icon-saoyisao1"></i>蓝牙加设备
				</div>
			</div>
		</div>
		</div>
	</div>
	<div ng-include="sys_html('common/_mygoodsindex')"></div>
	</div>
	</div>
	</div>
	<div ng-include="sys_html('common/_copyright',true)"></div>
	<div ng-include="sys_html('common/_nowbody')" style="position: absolute;top:1.5rem;left:0.5rem;width:auto"></div>
	<div ng-include="sys_html('common/_chekbody')"></div>
	<div ng-include="sys_html('common/_footer')"></div>
</div>
</div>
</div>
<div ng-if="pagedata.show2lanya" class="popup">
	<div class="popup-body">
		<div class="popup-center radius" style="width: 80%;">
		<div class="fui-cell-group" style="margin-top:1rem;-webkit-overflow-scrolling: touch;">
		<div class="c bold">蓝牙申请</div>
		<div class="fui-cell">
		<div class="fui-cell-text c">
			<div class="gray">
			申请使用您的蓝牙，为您提供相关服务(用于传输WIFI信息)需要开启微信定位授权和系统位置信息才能使用蓝牙配网！
			</div>
		</div>
		</div>
		</div>
		<div class="fui-cellone" style="padding-top:0.5rem;padding-bottom:0">
					<div class="fui-cellone-text c">
						<div class="radius c jy-btn2" ng-click="access_json('jy_aiagent/peiwifi/')" style="color:#fff;padding:0.5rem">
							允许
						</div>
						<div class="radius c" ng-click="pagedata.show2lanya=false;" style="padding:0.5rem">
							下次再说
						</div>
					</div>	
		</div>
		</div>
	</div>
</div>
<div ng-if="pagedata.show2addgoods" class="popup">
	<div class="popup-body">
		<div class="popup-center radius" style="width: 80%;">
		<div class="fui-cell-group" style="margin-top:1rem;-webkit-overflow-scrolling: touch;">
		<div class="c bold">添加设备</div>
		<div class="fui-cell">
		<div class="fui-cell-text c">
			<input type="text" class='fui-input' style="margin-left:0;background: #f2f2f2;" placeholder="请输入设备名称"  ng-model="pagedata.post.title"/>
		</div>
		</div>
		</div>
		<div class="fui-cellone" style="padding-top:padding:0.5rem">
					<div class="fui-cellone-text" style="padding-right:0.2rem;padding:0.5rem">
					<div class="radius c jy-btn1" ng-click="pagedata.show2addgoods=false" style="color:#7783EA;padding:0.5rem">
						取消
					</div>
					</div>	
					<div class="fui-cellone-text">
					<div class="radius c jy-btn2" ng-click="post_json('jy_aiagent/index/bendiaddgoods/',pagedata.post)" style="color:#fff;padding:0.5rem">
						确定
					</div>
					</div>	
		</div>
		</div>
	</div>
</div>
<div ng-if="pagedata.show2upgoods" class="popup">
	<div class="popup-body">
		<div class="popup-center radius" style="width: 80%;">
		<div class="fui-cell-group" style="margin-top:1rem;-webkit-overflow-scrolling: touch;">
		<div class="c bold">修改设备名</div>
		<div class="fui-cell">
		<div class="fui-cell-text c">
			<input type="text" class='fui-input' style="margin-left:0;background: #f2f2f2;" placeholder="请输入设备名称"  ng-model="pagedata.post.title"/>
		</div>
		</div>
		</div>
		<div class="fui-cellone" style="padding-top:0.5rem">
					<div class="fui-cellone-text" style="padding-right:0.5rem">
					<div class="radius c jy-btn1" ng-click="pagedata.show2upgoods=false" style="color:#7783EA;padding:0.5rem">
						取消
					</div>
					</div>	
					<div class="fui-cellone-text">
					<div class="radius c jy-btn2" ng-click="post_json('jy_aiagent/index/bendiupgoods/',pagedata.post)" style="color:#fff;padding:0.5rem">
						确定
					</div>
					</div>	
		</div>
		</div>
	</div>
</div>
<script>
scope.pagedata.scancode=function () {
			wx.scanQRCode({
				needResult: 1, // 默认为0，扫描结果由微信处理，1则直接返回扫描结果，
				scanType: ["qrCode","barCode"], // 可以指定扫二维码还是一维码，默认二者都有
				success: function (res) {
					var result = res.resultStr; // 当needResult 为 1 时，扫码返回的结果
					result=result.replace('EAN_13,', '');
					scope.pagedata.item.productsn = result;
					scope.$evalAsync();
				}
			});
}
</script>